import request from '@/utils/request'

// 查询专家库列表
export function listExpert(query) {
  return request({
    url: '/crm/expert/list',
    method: 'get',
    params: query
  })
}

// 查询专家库详细
export function getExpert(expertId) {
  return request({
    url: '/crm/expert/' + expertId,
    method: 'get'
  })
}

// 新增专家库
export function addExpert(data) {
  return request({
    url: '/crm/expert',
    method: 'post',
    data: data
  })
}

// 修改专家库
export function updateExpert(data) {
  return request({
    url: '/crm/expert',
    method: 'put',
    data: data
  })
}

// 删除专家库
export function delExpert(expertId) {
  return request({
    url: '/crm/expert/' + expertId,
    method: 'delete'
  })
}

// 获取全部专家信息
export function getExpertList(data) {
  return request({
    url: '/crm/expert/getExpertList',
    method: 'post',
    data: data
  })
}

// 查询专家库详细
export function getExpertByName(name) {
  return request({
    url: '/crm/expert/getExpertByName/' + name,
    method: 'get'
  })
}
